package com.spring.boot.controller;

import com.spring.boot.common.Result;
import com.spring.boot.entity.User;
import com.spring.boot.service.UserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;
    @PostMapping
    public Result<?> save(@RequestBody User user){
        userService.save(user);
        return Result.OK("新增成功",user);
    }
}
